#include "MyBufferTemplate.h"

#include <cstdio>

void testMyBufferVoid()
{
    MyBuffer<void> buf;
    for (int i = 0; i < 10; ++i)
    {
        buf.Put(new int(i));
    }
    for (int i = 0; i < 10; ++i)
    {
        void* p = buf.Get();
        int v = *(int*)p;
        if (i != v)
        {
            fprintf(stderr, "corrupted: %d %d\n", i, v);
        }
        delete p;
    }
}
